<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="MasterLocations.aspx.cs" Inherits="Administration_MasterLocations" Title="Untitled Page" CodeFileBaseClass="BaseView"
    ViewName="MasterLocations"  %>

<%@ Register Src="~/Controls/Common/ErrorNotification.ascx" TagName="ErrorNotification"
    TagPrefix="crux" %>
<%@ Register Src="~/Controls/Common/WaterMarkedTextBox.ascx" TagName="WaterMarkedTextBox"
    TagPrefix="crux" %>
<%@ Register Src="../Controls/Common/CalendarTextBox.ascx" TagName="CalendarTextBox"
    TagPrefix="crux" %>
<%@ Register Src="../Controls/Common/Calendar/CalendarScriptManager.ascx" TagName="CalendarScriptManager"
    TagPrefix="uc1" %>
<%@ Register Src="../Controls/Common/Calendar/Calendar.ascx" TagName="Calendar" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    
    <asp:UpdatePanel ID="updUpdate" runat="server">
        <ContentTemplate>
			<uc1:CalendarScriptManager ID="cld" runat="server" />
            <asp:Panel ID="pnlList" runat="server">
                <table cellpadding="0" cellspacing="0" class="toolbar">
                    <tr>
                        <td>
                            <asp:ImageButton ID="btnAddNew" runat="server" OnClick="btnAddNew_Click" meta:resourcekey="btnAddNewLocationResource1" />&nbsp;<asp:ImageButton ID="btnBack"
                                    Text="Back" runat="server" OnClick="btnBack_Click" ImageUrl="~/appimages/back.gif" />
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td height="12">
                        </td>
                    </tr>
                </table>

<asp:GridView ID="grdMasterLocation"  runat="server" AutoGenerateColumns="False" OnRowDataBound="grdMasterLocation_RowDataBound">
     <Columns>                 

     
<asp:BoundField DataField ="MasterLocationID" HeaderText=" Master Location ID"   />
<asp:BoundField DataField ="LocationCode" HeaderText=" Location Code"   />
<asp:BoundField DataField ="LocationName" HeaderText=" Location Name"   />
<asp:BoundField DataField ="LocationDescription" HeaderText=" Location Description"   />    
      <asp:TemplateField HeaderText="Actions" ItemStyle-CssClass="ActionButtons">
         <ItemTemplate>
               <center>
                 <asp:ImageButton ID="btnItemEditIcon" runat="server" CausesValidation="false" CommandName="EditItem"
                     OnCommand="grdMasterLocation_RowCommand" CommandArgument='<%#Eval("MasterLocationID")%>' ImageUrl="~/appimages/Edit.gif"
                     ToolTip="Edit" />
                    
                 <asp:ImageButton ID="btnItemDelete" runat="server" CausesValidation="false" CommandName="DeleteItem"
                  OnCommand="grdMasterLocation_RowCommand" CommandArgument='<%#Eval("MasterLocationID")%>' ImageUrl="~/appImages/delete.gif"
                  ToolTip="Delete" />
              </center>
         </ItemTemplate>
      </asp:TemplateField>
   </Columns>
</asp:GridView>
</asp:Panel>

 <asp:Panel ID="pnlAddEdit" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td class="formTxtHeader" colspan="2">
                            MasterLocation
                        </td>
                    </tr>
                    <tr>
                        <td class="formLine" colspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="formGroupGap">
                        </td>
                    </tr>
                     

                    <tr>
                        <td align="right" valign="middle" class="formLeftColmnWidth">
                            <asp:Label ID="lblMasterLocationID" runat="server" Text=" Master Location ID:" CssClass="formLabel" ></asp:Label>
                        </td>
                        <td align="left" valign="middle" >
                               <asp:Label ID="lblMasterLocationIDValue" runat="server" CssClass="formLabel"></asp:Label> 
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2" class="formGroupGap">
                        </td>
                    </tr>  

                    <tr>
                        <td align="right" valign="middle" class="formLeftColmnWidth">
                            <asp:Label ID="lblLocationCode" runat="server" Text=" Location Code:" CssClass="formLabel" ></asp:Label>
                        </td>
                        <td align="left" valign="middle" >
                               <crux:WaterMarkedTextBox ID="txtLocationCode" WaterMarkText=" Location Code" ValueRequired="true" ErrorText=" Location Code is required" Width="180"  MaxLength="100" runat="server" />
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2" class="formGroupGap">
                        </td>
                    </tr>  

                    <tr>
                        <td align="right" valign="middle" class="formLeftColmnWidth">
                            <asp:Label ID="lblLocationName" runat="server" Text=" Location Name:" CssClass="formLabel" ></asp:Label>
                        </td>
                        <td align="left" valign="middle" >
                               <crux:WaterMarkedTextBox ID="txtLocationName" WaterMarkText=" Location Name" ValueRequired="true" ErrorText=" Location Name is required" Width="180"  MaxLength="300" runat="server" />
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2" class="formGroupGap">
                        </td>
                    </tr>  

                    <tr>
                        <td align="right" valign="middle" class="formLeftColmnWidth">
                            <asp:Label ID="lblLocationDescription" runat="server" Text=" Location Description:" CssClass="formLabel" ></asp:Label>
                        </td>
                        <td align="left" valign="middle" >
                               <crux:WaterMarkedTextBox ID="txtLocationDescription" WaterMarkText=" Location Description" ValueRequired="true" ErrorText=" Location Description is required" Width="180"  MaxLength="800" runat="server" />
                        </td>
                    </tr>
                      <tr>
                        <td colspan="2" class="formGroupGap">
                        </td>
                    </tr>   

                    
                   
                   <tr>
                        <td>
                        </td>
                        <td align="left">
                            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                            &nbsp;
                            <asp:Button ID="btnCancel" runat="server" CausesValidation="false" Text="Cancel" OnClick="btnCancel_Click" />
                        </td>
                   </tr>
                </table>
 </asp:Panel>
            <crux:ErrorNotification ID="pnlError" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>